import { actionTypes } from "./actionTypes";

const initState: DeptManage = {
  deptData: []
};

const deptReducers = (state: DeptManage = initState, actions: any) => {
  switch (actions.type) {
    case actionTypes.GET_DEPT_TABLE:
      return {
        ...state,
        deptData: actions.payload
      };
    default:
      return state;
  }
};

export default deptReducers;
